package top.eggcode.plugins.query.clause;

import top.eggcode.plugins.query.def.LiteralSentence;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

/**
 * Title:
 * Description: TODO
 * Date: 2021/9/2 13:25
 *
 * @author JiaQi Ding
 * @version 1.0
 */
public class GroupByClause implements LiteralSentence {

    private final List<String> columns;


    public GroupByClause(String columnObject) {
        this.columns = new LinkedList<>();
        String[] columns = columnObject.split(",");
        for (String columnName : columns) {
            this.columns.add(columnName.trim());
        }
    }

    public GroupByClause(String... columns) {
        this.columns = new LinkedList<>();
        Collections.addAll(this.columns, columns);
    }


    @Override
    public String render() {
        return null;
    }
}
